home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- global gPlayerTipsThisLevel, gPlayedSlots, gPlayerTips, gBonusCharacters
- if gPlayerTipsThisLevel <= 0 then
- if voidp(gPlayedSlots) then
- gPlayerTips = 0
- regTip(50)
- gPlayedSlots = 1
- end if
- end if
- if soundBusy(3) then
- go(the frame)
- exit
- end if
- done = 1
- patron = []
- ing = []
- repeat with Y = 1 to 3
- X = gBonusCharacters[Y]
- if sprite(X).pStatus <> #done then
- done = 0
- exit repeat
- next repeat
- end if
- patron[Y] = sprite(X).pCharCode
- ing[Y] = sprite(X).pIngredient
- end repeat
- if not done then
- go(the frame)
- exit
- end if
- matchPatrons = 0
- if patron[1] = patron[2] then
- matchPatrons = matchPatrons + 1
- end if
- if patron[1] = patron[3] then
- matchPatrons = matchPatrons + 1
- end if
- if patron[2] = patron[3] then
- matchPatrons = matchPatrons + 1
- end if
- matchIngredients = 0
- matchBoth = 0
- if ing[1] = ing[2] then
- matchIngredients = matchIngredients + 1
- if patron[1] = patron[2] then
- matchBoth = matchBoth + 1
- end if
- end if
- if ing[1] = ing[3] then
- matchIngredients = matchIngredients + 1
- if patron[1] = patron[3] then
- matchBoth = matchBoth + 1
- end if
- end if
- if ing[2] = ing[3] then
- matchIngredients = matchIngredients + 1
- if patron[2] = patron[3] then
- matchBoth = matchBoth + 1
- end if
- end if
- put patron
- put ing
- if matchBoth = 3 then
- coins = 500
- else
- if matchPatrons = 3 then
- if matchIngredients = 1 then
- coins = 100
- else
- coins = 75
- end if
- else
- if matchBoth = 1 then
- if matchIngredients = 3 then
- coins = 75
- else
- coins = 50
- end if
- else
- if matchIngredients = 3 then
- coins = 35
- else
- if matchPatrons = 1 then
- if matchIngredients = 1 then
- coins = 15
- else
- coins = 8
- end if
- else
- if matchIngredients = 1 then
- coins = 6
- else
- coins = 0
- end if
- end if
- end if
- end if
- end if
- end if
- put "MatchBoth" && matchBoth
- put "MatchIngredients" && matchIngredients
- put "matchPatrons" && matchPatrons
- put "coins" && coins
- if coins > 0 then
- regTip(coins)
- else
- soundFX2("bad_drink", 0, 0)
- end if
- sprite(9).pStatus = #new
- go(the frame)
- end
-